package org.siam.impl.data.rendering {
	
	import mx.core.IFactory;
	
	import org.siam.core.data.rendering.IRendererRegistry;
	import org.siam.core.data.rendering.IRenderingManager;

	public class RenderingManager implements IRenderingManager {
		
		private var _registry:IRendererRegistry;
		
		public function RenderingManager() {
			_registry = new RendererRegistry();
		}

		public function findRenderer(id:String):IFactory {
			return _registry.find(id);
		}
		
		public function hasRenderer(id:String):Boolean {
			return _registry.has(id);
		}
		
		internal function registerRenderer(id:String, renderer:IFactory):void {
			if (!hasRenderer(id)) {
				_registry.register(id, renderer);
			}
		}
	}
}